package cn.wolfcode.enums;

import lombok.Getter;

@Getter
public enum ActivityTypeEnum {
    RADIO("单选",0),
    CHECKBOX("多选",1);

    private String name;
    private Integer value;

    ActivityTypeEnum(String name, Integer value){
        this.name = name;
        this.value = value;
    }

    public static String findName(Integer value){
        ActivityTypeEnum[] values = ActivityTypeEnum.values();
        for (ActivityTypeEnum anEnum : values) {
            if(anEnum.getValue().equals(value)){
                return anEnum.getName();
            }
        }
        return null;
    }
}
